//
// Decompiled with: Decompiler.NET, Version=1.3.1.18439, Culture=neutral, PublicKeyToken=null, Version: 1.3.1.18439
// Decompilation Started at: 3/15/2009 10:34:26 PM
// Copyright 2003 - 2004, Jungle Creatures, Inc., All Rights Reserved. 
// Written by Jonathan Pierce, Email: support@junglecreatures.com
//

namespace PatientManagement

{
		
		#region Namespace Import Declarations
		
			using System.Drawing;
			using System;
			using System.Windows.Forms;
			
		#endregion
		
	public class ImageCombo : ComboBox
	
	{
		
		#region Fields
			private ImageList imgs;
		#endregion
		
		#region Constructors
		
			public ImageCombo ()
			
			{
				this.imgs = new System.Windows.Forms.ImageList ();
				base.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
				return;
			}
			
		#endregion
		
		#region Properties
		
			public ImageList ImageList
			
			{
				get
				{
					System.Windows.Forms.ImageList theImageList;
					theImageList = this.imgs;
					goto L_0009;
					
				L_0009:
					
					{
					}
					return theImageList;
				}
				set
				{
					this.imgs = value;
					return;
				}
			}
			
		#endregion
		
		#region Methods
		
			protected override void OnDrawItem (DrawItemEventArgs e)
			
			{
				ImageComboItem theImageComboItem;
				Color theColor;
				System.Drawing.Font theFont;
				Rectangle theRectangle;
				System.Drawing.Size theSize;
				Rectangle theRectangle2;
				Rectangle theRectangle3;
				Rectangle theRectangle4;
				Rectangle theRectangle5;
				System.Drawing.Size theSize2;
				Rectangle theRectangle6;
				Rectangle theRectangle7;
				System.Drawing.Size theSize3;
				Rectangle theRectangle8;
				Rectangle theRectangle9;
				System.Drawing.Size theSize4;
				Rectangle theRectangle10;
				e.DrawBackground ();
				e.DrawFocusRectangle ();
				if (e.Index >= 0)
				{
					goto L_0070;
				}
				e.Graphics.DrawString (this.Text, e.Font, ((Brush) new SolidBrush (e.ForeColor)), ((float) ((theRectangle = e.Bounds).Left + (theSize = this.imgs.ImageSize).Width)), ((float) (theRectangle2 = e.Bounds).Top));
				goto L_0232;
				
			L_0070:
				
				{
				}
				if (base.Items[e.Index].GetType () != typeof (ImageComboItem))
				{
					goto L_01CB;
				}
				theImageComboItem = ((ImageComboItem) base.Items[e.Index]);
				
			L_00CE:
				
				{
				}
				
			L_00C8:
				
				{
				}
				theColor = ((theImageComboItem.ForeColor != Color.FromKnownColor (KnownColor.Transparent)) ? theImageComboItem.ForeColor : e.ForeColor);
				
			L_00EB:
				
				{
				}
				
			L_00DF:
				
				{
				}
				theFont = (theImageComboItem.Mark ? new System.Drawing.Font (e.Font, FontStyle.Bold) : e.Font);
				if (theImageComboItem.ImageIndex == -1)
				{
					goto L_017C;
				}
				theRectangle4 = e.Bounds;
				theRectangle3 = e.Bounds;
				this.ImageList.Draw (e.Graphics, theRectangle3.Left, theRectangle4.Top, theImageComboItem.ImageIndex);
				e.Graphics.DrawString (theImageComboItem.Text, theFont, ((Brush) new SolidBrush (theColor)), ((float) ((theRectangle5 = e.Bounds).Left + (theSize2 = this.imgs.ImageSize).Width)), ((float) (theRectangle6 = e.Bounds).Top));
				goto L_01C9;
				
			L_017C:
				
				{
				}
				e.Graphics.DrawString (theImageComboItem.Text, theFont, ((Brush) new SolidBrush (theColor)), ((float) ((theRectangle7 = e.Bounds).Left + (theSize3 = this.imgs.ImageSize).Width)), ((float) (theRectangle8 = e.Bounds).Top));
				
			L_01C9:
				
				{
				}
				goto L_0232;
				
			L_01CB:
				
				{
				}
				e.Graphics.DrawString (base.Items[e.Index].ToString (), e.Font, ((Brush) new SolidBrush (e.ForeColor)), ((float) ((theRectangle9 = e.Bounds).Left + (theSize4 = this.imgs.ImageSize).Width)), ((float) (theRectangle10 = e.Bounds).Top));
				
			L_0232:
				
				{
				}
				base.OnDrawItem (e);
				return;
			}
			
		#endregion
	}
	
}

